use axum::{
    Router,
    routing::{get, delete},
};
use sqlx::MySqlPool;
use crate::handlers::table;

pub fn routes(pool: MySqlPool) -> Router {
    Router::new()
        .route("/tables", get(table::get_tables).post(table::create_table))
        .route("/tables/:table_name", delete(table::delete_table))
        .with_state(pool)
}